const numbers: number[] = [1, 2, 3];

const stringArr: string[] = ["a", "b", "c"];

const undefinedArr: undefined[] = [undefined];

const arr: (string | number)[] = [1, "string2", 3];

const xjjs2: { name: string; age: number }[] = [
  { name: "zx", age: 22 },
  { name: "dx", age: 33 },
];

// type alias 类型别名

type Lady6 = { name: string; age: number };

class Madam6 {
  constructor() {
    this.name = "";
    this.age = 0;
  }
  name: string;
  age: number;
}
const xjjs3: Lady6[] = [
  { name: "zx", age: 22 },
  { name: "dx", age: 33 },
];
const xjjs4: Madam6[] = [
  { name: "zx2", age: 24 },
  { name: "dx2", age: 31 },
];

console.log(xjjs3);
console.log(xjjs4);
